package com.boot.dubbo.provider.service.impl;

import org.springframework.stereotype.Component;

import com.alibaba.dubbo.config.annotation.Service;
import com.boot.dubbo.inter.UserService;
import com.boot.dubbo.model.UserModel;

@Service(version = "1.0.0",timeout = 3000)   //属于Dubbo的@Service注解，非Spring  作用：暴露服务,配上版本号1.0.0说明向zookeeper注册的是版本为1.0.0的TestService接口，超时时长为3000ms等信息
@Component
public class UserServiceImpl implements UserService {

	@Override
	public UserModel getUser() {
		UserModel user = new UserModel();
		user.setAge(25);
		user.setName("张三");
		return user;
	}

}
